package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * TbListasValorDet generated by hbm2java
 */
@Entity
@Table(name = "TB_LISTAS_VALOR_DET", schema = "CATALOGOS")
public class TbListasValorDet implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private TbListasValorDetId id;
	private TbListasValor tbListasValor;
	private String cvalor;
	private String dlistaDet;
	private Date finicio;
	private Date ffin;
	private String cusuario;
	private Date fingreso;
	private String cvalor1;
	private String cvalor2;	
	private Date cvalorDate;
	private Double cvalorNumber;
 
	private List<String> excludedValues = new ArrayList<String>(0);
	private List<String> includedValues = new ArrayList<String>(0);
	
	

	public TbListasValorDet() {
	}

	public TbListasValorDet(TbListasValorDetId id, TbListasValor tbListasValor,
			String cvalor, Date finicio) {
		this.id = id;
		this.tbListasValor = tbListasValor;
		this.cvalor = cvalor;
		this.finicio = finicio;
	}

	public TbListasValorDet(TbListasValorDetId id, TbListasValor tbListasValor,
			String cvalor, String dlistaDet, Date finicio, Date ffin,
			String cusuario, Date fingreso, String cvalor1, String cvalor2, Date cvalorDate,
			Double cvalorNumber) {
		this.id = id;
		this.tbListasValor = tbListasValor;
		this.cvalor = cvalor;
		this.dlistaDet = dlistaDet;
		this.finicio = finicio;
		this.ffin = ffin;
		this.cusuario = cusuario;
		this.fingreso = fingreso;
		this.cvalor1 = cvalor1;
		this.cvalor2 = cvalor2;		
		this.cvalorDate = cvalorDate;
		this.cvalorNumber = cvalorNumber;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "clista", column = @Column(name = "C_LISTA", nullable = false, length = 50)),
			@AttributeOverride(name = "cmodulo", column = @Column(name = "C_MODULO", nullable = false, length = 50)),
			@AttributeOverride(name = "clistaDet", column = @Column(name = "C_LISTA_DET", nullable = false, length = 50)) })
	public TbListasValorDetId getId() {
		return this.id;
	}

	public void setId(TbListasValorDetId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER,cascade = CascadeType.REFRESH)
	@JoinColumns( {
			@JoinColumn(name = "C_LISTA", referencedColumnName = "C_LISTA", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "C_MODULO", referencedColumnName = "C_MODULO", nullable = false, insertable = false, updatable = false)})
	public TbListasValor getTbListasValor() {
		return this.tbListasValor;
	}

	public void setTbListasValor(TbListasValor tbListasValor) {
		this.tbListasValor = tbListasValor;
	}

	@Column(name = "C_VALOR", nullable = false, length = 1000)
	public String getCvalor() {
		return this.cvalor;
	}

	public void setCvalor(String cvalor) {
		this.cvalor = cvalor;
	}

	@Column(name = "D_LISTA_DET")
	public String getDlistaDet() {
		return this.dlistaDet;
	}

	public void setDlistaDet(String dlistaDet) {
		this.dlistaDet = dlistaDet;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "F_INICIO", nullable = false, length = 7)
	public Date getFinicio() {
		return this.finicio;
	}

	public void setFinicio(Date finicio) {
		this.finicio = finicio;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "F_FIN", length = 7)
	public Date getFfin() {
		return this.ffin;
	}

	public void setFfin(Date ffin) {
		this.ffin = ffin;
	}

	@Column(name = "C_USUARIO", length = 30, updatable=false)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "F_INGRESO", length = 7, updatable=false)
	public Date getFingreso() {
		return this.fingreso;
	}

	public void setFingreso(Date fingreso) {
		this.fingreso = fingreso;
	}

	@Column(name = "C_VALOR_1")
	public String getCvalor1() {
		return this.cvalor1;
	}

	public void setCvalor1(String cvalor1) {
		this.cvalor1 = cvalor1;
	}
	
	@Column(name = "C_VALOR_2")
	public String getCvalor2() {
		return this.cvalor2;
	}

	public void setCvalor2(String cvalor2) {
		this.cvalor2 = cvalor2;
	}	

	@Temporal(TemporalType.DATE)
	@Column(name = "C_VALOR_DATE", length = 7)
	public Date getCvalorDate() {
		return this.cvalorDate;
	}

	public void setCvalorDate(Date cvalorDate) {
		this.cvalorDate = cvalorDate;
	}

	@Column(name = "C_VALOR_NUMBER", precision = 14, scale = 4)
	public Double getCvalorNumber() {
		return this.cvalorNumber;
	}

	public void setCvalorNumber(Double cvalorNumber) {
		this.cvalorNumber = cvalorNumber;
	}
	@Transient
	public List<String> getExcludedValues() {
		return excludedValues;
	}

	public void setExcludedValues(List<String> excludedValues) {
		this.excludedValues = excludedValues;
	}
	
	@Transient
	public List<String> getIncludedValues() {
		return includedValues;
	}

	public void setIncludedValues(List<String> includedValues) {
		this.includedValues = includedValues;
	}

    public Object getListadoSortByDescriptionDesc(String P_TB_MEDIOS_INTERPOSICION, String P_MODULO) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
}
